#include <iostream>
#include <memory>
#include <easysock.h>

int main()
{
    inet::tcp::server tcp_svr(8080);
    int sock = tcp_svr.accept();

    while (true)
    {
        char buf[256] = {0};
        if (tcp_svr.recv(sock, buf, 255) <= 0)
        {
            return 0;
        }
        std::cout << "recv: " << buf << std::endl;
    }
    return 0;
}
